package com.frxuexi.lib_base.room

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.frxuexi.lib_base.entity.ProductBeanItem
import com.frxuexi.lib_base.entity.ProductInfo

@Dao
interface ProductDao {

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun addPro(productEntity: ProductEntity):Long

    @Query("select * from product where id=:id")
    fun isLove(id:Int):ProductEntity

    @Delete
    fun deleteLove(productEntity: ProductEntity):Int

    @Query("select * from product")
    fun getPros():List<ProductEntity>
}